<?php


$arr = [[45,45,4,5],[454,5,45]];

$num = 0;

foreach ($arr as  $a) {
	
	foreach ($a as  $v) {
		$num +=$v;
	}

}

var_dump($num);


$arr = [45,45,3,5,35,345];

$max = $arr[0];

foreach ($arr as $v) {
	if($v>$max){
		$max = $v;
	}
}

var_dump($max);


$arr = [];

$num = 0;
for ($i=1; $i <=100 ; $i++) { 
	if($i%2==1){
		$arr[$num] = $i;
		$num++;
	}
}

var_dump($arr);


$arr = [45,45,3,5,35,345];

$max = $arr[0];

$min = $arr[0];

foreach ($arr as $v) {
	if($v>$max){
		$max = $v;
	}

	if($v<$min){
		$min = $v;
	}
}

var_dump($max-$min);